package com.ZeroCarbon.service;

import com.ZeroCarbon.domain.dto.GoodsDetailDTO;
import com.ZeroCarbon.domain.dto.GoodsPreviewDTO;
import com.ZeroCarbon.domain.dto.GoodsReceiverDTO;
import com.ZeroCarbon.domain.po.Good;
import com.ZeroCarbon.entity.PageObject;
import com.ZeroCarbon.exception.BusinessLogicException;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.IOException;
import java.util.List;

public interface IGoodsService extends IService<Good> {
    void addGood(GoodsReceiverDTO goodsReceiverDTO) throws IOException, BusinessLogicException;

    PageObject getGoodsList(int page, int size, boolean isSave, boolean randomGet) throws BusinessLogicException;

    GoodsDetailDTO getGoodDetail(String id) throws BusinessLogicException;

    List<GoodsPreviewDTO> searchGood(String search, int page, int size) throws BusinessLogicException;
}
